Data is stored in a data storage device by writing the data to a storage medium in the data storage device. The stored data can be later retrieved from the storage device by reading the data from the storage medium. One example of a storage medium is tape. Tape drives may be used to read and write data to a magnetic tape medium contained within the data storage tape device. The magnetic tape medium typically comprises a thin film of magnetic material which stores the data. The tape medium may be moved by the tape drive between a pair of spaced apart reels and past a data transducer to record or read back information.
In some cases, the storage medium may contain a defect, which may have been created during the original manufacturing and assembly of the storage device, or may have developed at a later point. Defects in the tape medium are commonly the result of deviations in the manufacturing process. Two common defects are non-magnetic regions on the tape where the magnetic coating is not applied with the specified thickness or is applied with protrusions on the surface of the medium (i.e., roughness) causing loss of signal due to tape-head separation. Another common defect is creases or folds in the tape, which also causes tape-head separation. It is desirable to avoid writing data to the defective regions of the storage medium in order to avoid loss or corruption of the data stored thereon.
In conventional hard drives, a defect map may be stored on the drive in order to cope with defects on the storage medium. This defect map may include a mapping of all of the blocks of data on the hard drive, with an indication of defective blocks. When writing data to the hard drive, the defect map may be consulted in order to determine where to write data. In addition, when encountering newly discovered defects during the reading and/or writing process, the defect map can be updated accordingly to avoid future writes to the defective region.
Where the storage medium comprises a tape storage medium, some unique defect handling concerns may arise due to the linear nature of tape media. On tape media, blocks of data are stored sequentially along the length of the tape, which can be, for example, 2000 feet long. If a defect map is stored in some predefined location on the tape medium, then any time a new defect is discovered, the tape drive must rewind to that predefined location before being able to write the new defect information to the defect map. The process of winding the tape from the location of the defect to the predefined defect map location can be prohibitively slow.